package srzy.module

import srzy.common.Logging
import scala.actors.Actor
import srzy.data.PublicData

object RunStatus extends Actor with Logging {

  val fileName = "status.txt"
  val caseList = PublicData.caseInfos.map(x => x.caseName)
  val title = new java.io.File(".").getName()

  logger.debug("RunStatus fileName:" + fileName)
  logger.debug("title:" + title)
  var caseStartTime: Long = 0L

  def act() = {
    loop {
      react {
        case ('start, i: Int) => caseStartTime = System.currentTimeMillis()
        case ('end, i: Int) => caseStartTime = System.currentTimeMillis()

        case 'exit => {
          sender ! 'ok
          exit()
        }
      }
    }
  }

}